Application-tailored object re-use and recycling

ABSTRACT

A computing device receives a request for content for a content layout in a displayable region of a screen associated with the device. The device determines, based on application-tailored recycling policies, whether a recycler includes a display object that is suitable for recycling or re-use. If it does not, the device creates the display object and fills it with the content. If it does, and if the display object contains the content, the device updates elements of the display object as needed; otherwise, if the display object does not contain the content, the device fills the display object with the content and returns it. The recycling or re-using may also be performed with sub-elements of a display object, some of which may comprise nested display objects.

TECHNICAL FIELD

This disclosure generally relates to object lifecycle management.

BACKGROUND

Creating display objects and filling them with content may constitute asignificant cause of latency for content-intensive applications. Whenrendering a content layout for a particular display screen where thecontent extends below the fold (requiring the user to scroll the contentlayout to bring content into view), display objects may be created andfilled with content as they come into view and recycled as theydisappear from view. Default recycling utilities provided by anoperating system may prove insufficient for the requirements of such acontent-intensive application, particularly for applications whererecently-requested display objects may be requested again within a shortperiod of time, possibly repeatedly.

SUMMARY OF PARTICULAR EMBODIMENTS

In order to facilitate re-use and recycling of expensive display objectsin a content-aware manner, an application may apply application-specificrecycling policies to determine how to assess and when to divert thedisplay objects to an application-tailored object recycler for re-use bythe application. Upon receiving a request for a particular contentelement to be displayed, the application creates a display object andrenders the display object. Prior to returning it to the operatingsystem for display, the application may enclose the display object in acheaply-created wrapper object, depending on an assessment of thedisplay object in light of the application-specific recycling policies.When the operating system calls the object's finalize method inpreparation to send the object to the operating system's defaultrecycling utility, the application extracts and caches the displayobject in the recycler, and allows the operating system to dispose ofthe (empty) wrapper object in accordance with its default recyclingpolicies. When the same content element is requested again, theapplication retrieves the display object from the recycler, encloses itin a wrapper object, and returns the wrapped display object.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A is a wireframe of a content layout rendered using displayobjects.

FIG. 1B is a wireframe illustrating a detailed section of FIG. 1A.

FIG. 2 illustrates an example method for application-controlled objectrecycling.

FIG. 3 illustrates an example network environment associated with asocial-networking system.

FIG. 4 illustrates an example social graph.

FIG. 5 illustrates an example computer system.

DESCRIPTION OF EXAMPLE EMBODIMENTS

Recycling of display objects by a default recycling utility may behandled uniformly without any awareness of content-based or usage-basedcontext. This can trigger unnecessary and expensive operations to createdisplay objects more often than might otherwise be necessary and to fillinefficiently-recycled display objects with content. When a displayobject has the potential to become very large (e.g., ANDROID's ListViewor GridView objects), and the user may traverse the list or grid backand forth past the same content elements repeatedly, it becomes evenmore desirable to avoid unnecessary operations due to a failure toefficiently reuse display objects that were recently requested.

In order to facilitate re-use and recycling of expensive display objectsin a content-aware manner, an application may apply application-specificrecycling policies to determine how to assess and when to divert thedisplay objects to an application-tailored object recycler for re-use bythe application. Upon receiving a request for a particular contentelement to be displayed, the application creates a display object andrenders the display object. Prior to returning it to the operatingsystem for display, the application may enclose the display object in acheaply-created wrapper object, depending on an assessment of thedisplay object in light of the application-specific recycling policies.When the operating system calls the object's finalize method inpreparation to send the object to the operating system's defaultrecycling utility, the application extracts and caches the displayobject in the recycler, and allows the operating system to dispose ofthe (empty) wrapper object in accordance with its default recyclingpolicies. When the same content element is requested again, theapplication retrieves the display object from the recycler, encloses itin a wrapper object, and returns the wrapped display object. The wrapperobject itself may be created anew or provided by the operating system'sdefault recycling utility—any latency due to creation of a new wrapperobject is very low in comparison to the expensive operations of creatingand/or filling a display object.

In particular embodiments, the recycler may be implemented using anysuitable data structure (e.g., a heap) from which display objects may bestored in and retrieved from the recycler using any retrieval key thatis appropriate for the application. For example, in achronologically-organized newsfeed application provided by asocial-networking system where each listing in the newsfeed is relatedto activity of a connection in a user's social graph, each displayobject may be stored in association with a retrieval key comprising: anewsfeed item ID number, a hash key generated based on an element of thenewsfeed item, a position of the newsfeed item in the newsfeed, atimestamp associated with the newsfeed item, an identifier generatedbased on identifier(s) associated with any element(s) in a social graphto which the particular content is related, or a hash key based oninformation associated with any element(s) in a social graph to whichthe particular content is related. In particular embodiments, there maybe one or more recyclers for an application, based upon the requirementsof the application. For example, an application may maintain onerecycler per display object type. In another example, the applicationmay maintain one recycler for display objects that expire quickly and/ormust be updated frequently and another recycler for display objects thatdo not expire or that remain valid for longer periods of time. As one ofskill in the art would be aware, any number of recyclers may beutilized, as appropriate for the requirements of a specific application.

The embodiments described herein may also be performed with sub-elementsof a display object, some of which may comprise nested display objects.

FIG. 1A is a wireframe illustrating an example wireframe of a contentlayout 100 a newsfeed page for a user of a social-networking system thatis rendered for display on a tablet device based on a number of displayobjects. The displayable region of content layout 100 (indicated by thedashed line) includes the portion of content layout 100 that will fitwithin the screen dimensions of the tablet device (above the fold).

Content layout 100 includes a header region 110, a menu bar 120, aleft-hand sidebar 130, a right-hand sidebar 140, and a main body area150. Each region is associated with its own display object, each ofwhich may include a number of elements such as, by way of example andnot limitation: image(s), video, text, links, forms, and interactiveelements. Each of these elements may be represented by one or morenested display objects.

The display object associated with header region 110 includes aninteractive profile photo 112 of the social-network user, text block114, a background image 116, and theme music selected by thesocial-network user. Interactive profile photo 112 is rendered based ona display object that may include an image, text, a link, and Javascriptcode to render a pop-up window displaying a summary of a profile of thesocial-network user that appears when a pointing device, such as amouse, hovers over the profile photo.

The display object associated with menu bar 120 includes five menuoptions 125A-F, each of which comprises an image, text, and a link.

The display object associated with left-hand sidebar 130 includescontent for a mix of recommendations (including sponsored stories) (only135A-E are shown, but there may be many more recommendations), each ofwhich is rendered based on a display object. Each display object for arecommendation may include an interactive image, a title, text for therecommendation, and a link to obtain further information related to therecommendation. Each display object for a newsfeed item may also includeone or more images or a video

The display object associated with right-hand sidebar 140 includescontent for one or more advertisements 145, each of which is renderedbased on a display object. As illustrated in the example shown in FIG.1A, advertisement 145A appears above the fold, whereas 145B is not yetin view. The content of the advertisement may be determined at least inpart by a third-party advertiser.

The display object associated with main body area 150 includes a numberof newsfeed items (only 155A-E are shown, but there may be many morenewsfeed items), each of which is rendered based on a display objectassociated with an activity related to friend (i.e., social-graphconnection) of the user.

FIG. 1B is a wireframe illustrating a detailed section of FIG. 1A:newsfeed items 155B-E in the main body area 150 of content layout 100.As indicated in FIG. 1A, the displayable region of content layout 100(indicated by the dashed line) includes the portion of content layout100 that will fit onto the screen of the tablet device.

Each display object for a newsfeed item 155 may include an interactiveprofile photo of the friend 160, a name of the friend 165, text for thenewsfeed item 170, time-sensitive information 175 (e.g., aconstantly-updating count of the number of people who haveviewed/commented on/“Liked” the listing, a short listing of the mostrecent one or two people who viewed/commented on/“Liked” the listing,etc.), a link to “Like” the newsfeed item 180, a link to comment on thenewsfeed item 185, and a link to “Share” the newsfeed item 190. Eachdisplay object for a newsfeed item may also include one or more images195 or a video.

Each interactive profile photo 160 is rendered based on a display objectthat may include an image, text, a link, and Javascript code to render apop-up window displaying a summary of a profile of the social-networkuser that appears when a pointing device, such as a mouse, hovers overthe profile photo.

FIG. 2 illustrates an example method for application-controlled objectrecycling. In step 210, an application receives a request for particularcontent (e.g., newsfeed item 155C), to which it needs to respond with adisplay object containing the requested content. As described above, thedisplay object may contain a number of elements, which may themselves bedisplay objects. For example, newsfeed item 155C includes an interactiveprofile photo 160 that may be rendered by a display object.

In step 220, the application determines whether there is a displayobject in the application-tailored recycler that may be suitable forre-use or recycling in accordance with application-tailored recyclingpolicies. A display object may be suitable for re-use if it contains thesame or similar content as that which is currently being requested. Adisplay object may be suitable for recycling if it is the same type ofobject but is filled with different content. This determination may bedependent upon application-specific, device-specific, and/oruser-specific recycling policies. In particular embodiments, anapplication may set recycling policies in accordance with applicationrequirements, content types, device attributes (e.g., available memoryand/or dimensions of a display screen), content statistics, usagepatterns and preferences, or any other appropriate factor(s). Suchpolicies may govern how many objects to retain in the recycler, whattypes of objects to store in the recycler, how to determine whether adisplay object is suitable for re-use and/or re-cycling, when to re-useversus recycle a display object, etc.

In step 225, there are two situations in which the recycler returns anull. The first situation is simple—no display object of the correcttype was found in the recycler. In the second situation, a displayobject suitable for recycling but not re-use was found in the recycler,however recycling policies prohibit recycling of the display object.

For example, in the newsfeed layout shown in FIG. 1B, the userpreviously viewed and scrolled past newsfeed item 155A and thedisplayable region is occupied by newsfeed items 155B-E. This means thata display object for newsfeed item 155A would have been previouslygenerated, filled with content, displayed, and then stored in therecycler. If the user scrolls down, and the application receives arequest for a display object containing content for newsfeed item 155F,then the application will determine whether the display object fornewsfeed item 155A can be recycled for newsfeed item 155F. If theapplication only permits recycling of objects once a number of displayobjects have been stored in the recycler (so as to promote re-use,rather than constant recycling), then the recycler may return a null, inorder to force creation of a new display object for newsfeed item 155F(and preserve the display object for newsfeed item 155A in anticipationthat newsfeed item 155A may be requested again soon).

In either case, the application creates a new display object of anappropriate type to display the requested content, and then fills thedisplay object with the requested content (step 250). This is the mostexpensive path, since both creating the new display object and fillingan empty display object are costly operations. Therefore, an applicationmay need to balance conflicting priorities when determining when toprohibit recycling of otherwise suitable display objects stored in therecycler.

In step 230, if a suitable display object is available in the recycler,the application determines whether the content in the display object isthe same as or similar to the requested content.

In step 235, if the display object contains the same or similar contentas the requested content, the application can re-use the retrieveddisplay object for this request. For example, in the newsfeed layoutshown in FIG. 1B, the user previously viewed and scrolled past newsfeeditem 155A and the displayable region is occupied by newsfeed items155B-E. This means that a display object for newsfeed item 155A wouldhave been previously generated, filled with content, displayed, and thenstored in the recycler. If the user scrolls back up, and the applicationreceives a request for a display object containing content for newsfeeditem 155A, then the display object containing the content for newsfeeditem 155A can be retrieved from the recycler and re-used.

In order to re-use the retrieved display object, it may be necessary toupdate particular elements of the display object as needed (step 240),such as time-sensitive elements. For example, a newsfeed item 155 mayneed to update time-sensitive information 175 (e.g., aconstantly-updating count of the number of people who haveviewed/commented on/“Liked” the listing, a short listing of the mostrecent one or two people who viewed/commented on/“Liked” the listing,etc.). In some cases, the content contained in the display object may bevery similar to the requested content but not exactly the same. In someembodiments, the application may be aware of which elements need to beupdated, and just update those elements. In some embodiments, theapplication may perform a content comparison (e.g., comparing hashes) todetermine which elements need to be updated and which do not. In someembodiments, the application may be able to determine which elementsneed to be updated based on metadata and/or attributes associated withthe requested content.

Application-tailored recycling policies may apply rules to determinewhen it is efficient to update particular elements on an as-needed basisand when it may be more efficient to re-fill the display object fromscratch (see step 250). Regardless, re-use of a display object istypically the least expensive path, since two costly operations areeliminated: creating the new display object and filling an empty displayobject.

In step 245, if the display object in the recycler is the same displayobject type, but it is not filled with the same or very similar contentas the requested content, the application can re-cycle the displayobject for this request. For example, in the newsfeed layout shown inFIG. 1B, the user previously viewed and scrolled past newsfeed item 155Aand the displayable region is occupied by newsfeed items 155B-E. Thismeans that a display object for newsfeed item 155A would have beenpreviously generated, filled with content, displayed, and then stored inthe recycler. If the user scrolls down, and the application receives arequest for a display object containing content for newsfeed item 155F,then the display object containing the content for newsfeed item 155Acan be retrieved from the recycler and re-cycled for newsfeed item 155F(if permitted by the application's recycling policies).

In this case, the application fills the display object with therequested content (step 250) from scratch, thereby overwriting most ifnot all of the existing content in the display object. This is lessdesirable than re-use of the display object, since filling an displayobject is a costly operation, but recycling at least avoids the cost ofthe creating a new display object as well. In particular embodiments, atthis point, steps 220-270 may be performed in a recursive manner withsub-elements of a display object, some of which may themselves comprisenested display objects.

In step 260, the application may encapsulate the display object in awrapper object. In particular embodiments, the default recycling utilityprovided by the operating system may have attempted to provide arecycled wrapper object based on the requested display object. If awrapper object was provided for the display object, then the applicationmay use the provided wrapper object; if not, then the application maycreate a new wrapper object. In step 270, the application returns theencapsulated display object in response to the request.

In step 280, the application may receive an indication that the displayobject is no longer needed for the content layout in the display region.In step 290, the application stores the display object in the recycler.If a wrapper object was used, the application may extract the displayobject from the wrapper object prior to storing the display object, soas to allow the default recycling utility provided by the operatingsystem to recycle the now-empty wrapper object.

Embodiments disclosed herein are described as being performed by anapplication; however, as one of skill in the art would be aware, many ofthe steps in example method 200 and other embodiments disclosed hereinmay be performed by one or more pieces of software operating at one ormore layers of abstraction. For example, within the context of theANDROID operating system, a recycler may be provided for a fragmentand/or a recycler may be provided for an activity. In another example,the functions of a recycler may be performed by software that executesseparately from the application.

Particular embodiments may repeat one or more steps of the method ofFIG. 2, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 2 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 2 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates particular components,devices, or systems carrying out particular steps of the method of FIG.2, this disclosure contemplates any suitable combination of any suitablecomponents, devices, or systems carrying out any suitable steps of themethod of FIG. 2.

FIG. 3 illustrates an example network environment 300 associated with asocial-networking system. Network environment 300 includes a clientsystem 330, a social-networking system 360, and a third-party system 370connected to each other by a network 310. Although FIG. 3 illustrates aparticular arrangement of client system 330, social-networking system360, third-party system 370, and network 310, this disclosurecontemplates any suitable arrangement of client system 330,social-networking system 360, third-party system 370, and network 310.As an example and not by way of limitation, two or more of client system330, social-networking system 360, and third-party system 370 may beconnected to each other directly, bypassing network 310. As anotherexample, two or more of client system 330, social-networking system 360,and third-party system 370 may be physically or logically co-locatedwith each other in whole or in part. Moreover, although FIG. 3illustrates a particular number of client systems 330, social-networkingsystems 360, third-party systems 370, and networks 310, this disclosurecontemplates any suitable number of client systems 330,social-networking systems 360, third-party systems 370, and networks310. As an example and not by way of limitation, network environment 300may include multiple client system 330, social-networking systems 360,third-party systems 370, and networks 310.

This disclosure contemplates any suitable network 310. As an example andnot by way of limitation, one or more portions of network 310 mayinclude an ad hoc network, an intranet, an extranet, a virtual privatenetwork (VPN), a local area network (LAN), a wireless LAN (WLAN), a widearea network (WAN), a wireless WAN (WWAN), a metropolitan area network(MAN), a portion of the Internet, a portion of the Public SwitchedTelephone Network (PSTN), a cellular telephone network, or a combinationof two or more of these. Network 310 may include one or more networks310.

Links 350 may connect client system 330, social-networking system 360,and third-party system 370 to communication network 310 or to eachother. This disclosure contemplates any suitable links 350. Inparticular embodiments, one or more links 350 include one or morewireline (such as for example Digital Subscriber Line (DSL) or Data OverCable Service Interface Specification (DOCSIS)), wireless (such as forexample Wi-Fi or Worldwide Interoperability for Microwave Access(WiMAX)), or optical (such as for example Synchronous Optical Network(SONET) or Synchronous Digital Hierarchy (SDH)) links. In particularembodiments, one or more links 350 each include an ad hoc network, anintranet, an extranet, a VPN, a LAN, a WLAN, a WAN, a WWAN, a MAN, aportion of the Internet, a portion of the PSTN, a cellulartechnology-based network, a satellite communications technology-basednetwork, another link 350, or a combination of two or more such links350. Links 350 need not necessarily be the same throughout networkenvironment 300. One or more first links 350 may differ in one or morerespects from one or more second links 350.

In particular embodiments, client system 330 may be an electronic deviceincluding hardware, software, or embedded logic components or acombination of two or more such components and capable of carrying outthe appropriate functionalities implemented or supported by clientsystem 330. As an example and not by way of limitation, a client system330 may include a computer system such as a desktop computer, notebookor laptop computer, netbook, a tablet computer, e-book reader, GPSdevice, camera, personal digital assistant (PDA), handheld electronicdevice, cellular telephone, smartphone, other suitable electronicdevice, or any suitable combination thereof. This disclosurecontemplates any suitable client systems 330. A client system 330 mayenable a network user at client system 330 to access network 310. Aclient system 330 may enable its user to communicate with other users atother client systems 330.

In particular embodiments, client system 330 may include a web browser332, such as MICROSOFT INTERNET EXPLORER, GOOGLE CHROME or MOZILLAFIREFOX, and may have one or more add-ons, plug-ins, or otherextensions, such as TOOLBAR or YAHOO TOOLBAR. A user at client system330 may enter a Uniform Resource Locator (URL) or other addressdirecting the web browser 332 to a particular server (such as server362, or a server associated with a third-party system 370), and the webbrowser 332 may generate a Hyper Text Transfer Protocol (HTTP) requestand communicate the HTTP request to server. The server may accept theHTTP request and communicate to client system 330 one or more Hyper TextMarkup Language (HTML) files responsive to the HTTP request. Clientsystem 330 may render a webpage based on the HTML files from the serverfor presentation to the user. This disclosure contemplates any suitablewebpage files. As an example and not by way of limitation, webpages mayrender from HTML files, Extensible Hyper Text Markup Language (XHTML)files, or Extensible Markup Language (XML) files, according toparticular needs. Such pages may also execute scripts such as, forexample and without limitation, those written in JAVASCRIPT, JAVA,MICROSOFT SILVERLIGHT, combinations of markup language and scripts suchas AJAX (Asynchronous JAVASCRIPT and XML), and the like. Herein,reference to a webpage encompasses one or more corresponding webpagefiles (which a browser may use to render the webpage) and vice versa,where appropriate.

In particular embodiments, social-networking system 360 may be anetwork-addressable computing system that can host an online socialnetwork. Social-networking system 360 may generate, store, receive, andsend social-networking data, such as, for example, user-profile data,concept-profile data, social-graph information, or other suitable datarelated to the online social network. Social-networking system 360 maybe accessed by the other components of network environment 300 eitherdirectly or via network 310. In particular embodiments,social-networking system 360 may include one or more servers 362. Eachserver 362 may be a unitary server or a distributed server spanningmultiple computers or multiple datacenters. Servers 362 may be ofvarious types, such as, for example and without limitation, web server,news server, mail server, message server, advertising server, fileserver, application server, exchange server, database server, proxyserver, another server suitable for performing functions or processesdescribed herein, or any combination thereof. In particular embodiments,each server 362 may include hardware, software, or embedded logiccomponents or a combination of two or more such components for carryingout the appropriate functionalities implemented or supported by server362. In particular embodiments, social-networking system 364 may includeone or more data stores 364. Data stores 364 may be used to storevarious types of information. In particular embodiments, the informationstored in data stores 364 may be organized according to specific datastructures. In particular embodiments, each data store 364 may be arelational, columnar, correlation, or other suitable database. Althoughthis disclosure describes or illustrates particular types of databases,this disclosure contemplates any suitable types of databases.

Particular embodiments may provide interfaces that enable a clientsystem 330, a social-networking system 360, or a third-party system 370to manage, retrieve, modify, add, or delete, the information stored indata store 364.

In particular embodiments, social-networking system 360 may store one ormore social graphs in one or more data stores 364. In particularembodiments, a social graph may include multiple nodes—which may includemultiple user nodes (each corresponding to a particular user) ormultiple concept nodes (each corresponding to a particular concept)—andmultiple edges connecting the nodes. Social-networking system 360 mayprovide users of the online social network the ability to communicateand interact with other users. In particular embodiments, users may jointhe online social network via social-networking system 360 and then addconnections (e.g., relationships) to a number of other users ofsocial-networking system 360 whom they want to be connected to. Herein,the term “friend” may refer to any other user of social-networkingsystem 360 with whom a user has formed a connection, association, orrelationship via social-networking system 360.

In particular embodiments, social-networking system 360 may provideusers with the ability to take actions on various types of items orobjects, supported by social-networking system 360. As an example andnot by way of limitation, the items and objects may include groups orsocial networks to which users of social-networking system 360 maybelong, events or calendar entries in which a user might be interested,computer-based applications that a user may use, transactions that allowusers to buy or sell items via the service, interactions withadvertisements that a user may perform, or other suitable items orobjects. A user may interact with anything that is capable of beingrepresented in social-networking system 360 or by an external system ofthird-party system 370, which is separate from social-networking system360 and coupled to social-networking system 360 via a network 310.

In particular embodiments, social-networking system 360 may be capableof linking a variety of entities. As an example and not by way oflimitation, social-networking system 360 may enable users to interactwith each other as well as receive content from third-party systems 370or other entities, or to allow users to interact with these entitiesthrough an application programming interfaces (API) or othercommunication channels.

In particular embodiments, a third-party system 370 may include one ormore types of servers, one or more data stores, one or more interfaces,including but not limited to APIs, one or more web services, one or morecontent sources, one or more networks, or any other suitable components,e.g., that servers may communicate with. A third-party system 370 may beoperated by a different entity from an entity operatingsocial-networking system 360. In particular embodiments, however,social-networking system 360 and third-party systems 370 may operate inconjunction with each other to provide social-networking services tousers of social-networking system 360 or third-party systems 370. Inthis sense, social-networking system 360 may provide a platform, orbackbone, which other systems, such as third-party systems 370, may useto provide social-networking services and functionality to users acrossthe Internet.

In particular embodiments, a third-party system 370 may include athird-party content object provider. A third-party content objectprovider may include one or more sources of content objects, which maybe communicated to a client system 330. As an example and not by way oflimitation, content objects may include information regarding things oractivities of interest to the user, such as, for example, movie showtimes, movie reviews, restaurant reviews, restaurant menus, productinformation and reviews, or other suitable information. As anotherexample and not by way of limitation, content objects may includeincentive content objects, such as coupons, discount tickets, giftcertificates, or other suitable incentive objects.

In particular embodiments, social-networking system 360 also includesuser-generated content objects, which may enhance a user's interactionswith social-networking system 360. User-generated content may includeanything a user can add, upload, send, or “post” to social-networkingsystem 360. As an example and not by way of limitation, a usercommunicates posts to social-networking system 360 from a client system330. Posts may include data such as status updates or other textualdata, location information, photos, videos, links, music or othersimilar data or media. Content may also be added to social-networkingsystem 360 by a third-party through a “communication channel,” such as anewsfeed or stream.

In particular embodiments, social-networking system 360 may include avariety of servers, sub-systems, programs, modules, logs, and datastores. In particular embodiments, social-networking system 360 mayinclude one or more of the following: a web server, action logger,API-request server, relevance-and-ranking engine, content-objectclassifier, notification controller, action log,third-party-content-object-exposure log, inference module,authorization/privacy server, search module, advertisement-targetingmodule, user-interface module, user-profile store, connection store,third-party content store, or location store. Social-networking system360 may also include suitable components such as network interfaces,security mechanisms, load balancers, failover servers,management-and-network-operations consoles, other suitable components,or any suitable combination thereof. In particular embodiments,social-networking system 360 may include one or more user-profile storesfor storing user profiles. A user profile may include, for example,biographic information, demographic information, behavioral information,social information, or other types of descriptive information, such aswork experience, educational history, hobbies or preferences, interests,affinities, or location. Interest information may include interestsrelated to one or more categories. Categories may be general orspecific. As an example and not by way of limitation, if a user “likes”an article about a brand of shoes the category may be the brand, or thegeneral category of “shoes” or “clothing.” A connection store may beused for storing connection information about users. The connectioninformation may indicate users who have similar or common workexperience, group memberships, hobbies, educational history, or are inany way related or share common attributes. The connection informationmay also include user-defined connections between different users andcontent (both internal and external). A web server may be used forlinking social-networking system 360 to one or more client systems 330or one or more third-party system 370 via network 310. The web servermay include a mail server or other messaging functionality for receivingand routing messages between social-networking system 360 and one ormore client systems 330. An API-request server may allow a third-partysystem 370 to access information from social-networking system 360 bycalling one or more APIs. An action logger may be used to receivecommunications from a web server about a user's actions on or offsocial-networking system 360. In conjunction with the action log, athird-party-content-object log may be maintained of user exposures tothird-party-content objects. A notification controller may provideinformation regarding content objects to a client system 330.Information may be pushed to a client system 330 as notifications, orinformation may be pulled from client system 330 responsive to a requestreceived from client system 330. Authorization servers may be used toenforce one or more privacy settings of the users of social-networkingsystem 360. A privacy setting of a user determines how particularinformation associated with a user can be shared. The authorizationserver may allow users to opt in to or opt out of having their actionslogged by social-networking system 360 or shared with other systems(e.g., third-party system 370), such as, for example, by settingappropriate privacy settings. Third-party-content-object stores may beused to store content objects received from third parties, such as athird-party system 370. Location stores may be used for storing locationinformation received from client systems 330 associated with users.Advertisement-pricing modules may combine social information, thecurrent time, location information, or other suitable information toprovide relevant advertisements, in the form of notifications, to auser.

FIG. 4 illustrates example social graph 400. In particular embodiments,social-networking system 360 may store one or more social graphs 400 inone or more data stores. In particular embodiments, social graph 400 mayinclude multiple nodes—which may include multiple user nodes 402 ormultiple concept nodes 404—and multiple edges 406 connecting the nodes.Example social graph 400 illustrated in FIG. 4 is shown, for didacticpurposes, in a two-dimensional visual map representation. In particularembodiments, a social-networking system 360, client system 330, orthird-party system 370 may access social graph 400 and relatedsocial-graph information for suitable applications. The nodes and edgesof social graph 400 may be stored as data objects, for example, in adata store (such as a social-graph database). Such a data store mayinclude one or more searchable or queryable indexes of nodes or edges ofsocial graph 400.

In particular embodiments, a user node 402 may correspond to a user ofsocial-networking system 360. As an example and not by way oflimitation, a user may be an individual (human user), an entity (e.g.,an enterprise, business, or third-party application), or a group (e.g.,of individuals or entities) that interacts or communicates with or oversocial-networking system 360. In particular embodiments, when a userregisters for an account with social-networking system 360,social-networking system 360 may create a user node 402 corresponding tothe user, and store the user node 402 in one or more data stores. Usersand user nodes 402 described herein may, where appropriate, refer toregistered users and user nodes 402 associated with registered users. Inaddition or as an alternative, users and user nodes 402 described hereinmay, where appropriate, refer to users that have not registered withsocial-networking system 360. In particular embodiments, a user node 402may be associated with information provided by a user or informationgathered by various systems, including social-networking system 360. Asan example and not by way of limitation, a user may provide his or hername, profile picture, contact information, birth date, sex, maritalstatus, family status, employment, education background, preferences,interests, or other demographic information. In particular embodiments,a user node 402 may be associated with one or more data objectscorresponding to information associated with a user. In particularembodiments, a user node 402 may correspond to one or more webpages.

In particular embodiments, a concept node 404 may correspond to aconcept. As an example and not by way of limitation, a concept maycorrespond to a place (such as, for example, a movie theater,restaurant, landmark, or city); a website (such as, for example, awebsite associated with social-network system 360 or a third-partywebsite associated with a web-application server); an entity (such as,for example, a person, business, group, sports team, or celebrity); aresource (such as, for example, an audio file, video file, digitalphoto, text file, structured document, or application) which may belocated within social-networking system 360 or on an external server,such as a web-application server; real or intellectual property (suchas, for example, a sculpture, painting, movie, game, song, idea,photograph, or written work); a game; an activity; an idea or theory;another suitable concept; or two or more such concepts. A concept node404 may be associated with information of a concept provided by a useror information gathered by various systems, including social-networkingsystem 360. As an example and not by way of limitation, information of aconcept may include a name or a title; one or more images (e.g., animage of the cover page of a book); a location (e.g., an address or ageographical location); a website (which may be associated with a URL);contact information (e.g., a phone number or an email address); othersuitable concept information; or any suitable combination of suchinformation. In particular embodiments, a concept node 404 may beassociated with one or more data objects corresponding to informationassociated with concept node 404. In particular embodiments, a conceptnode 404 may correspond to one or more webpages.

In particular embodiments, a node in social graph 400 may represent orbe represented by a webpage (which may be referred to as a “profilepage”). Profile pages may be hosted by or accessible tosocial-networking system 360. Profile pages may also be hosted onthird-party websites associated with a third-party server 370. As anexample and not by way of limitation, a profile page corresponding to aparticular external webpage may be the particular external webpage andthe profile page may correspond to a particular concept node 404.Profile pages may be viewable by all or a selected subset of otherusers. As an example and not by way of limitation, a user node 402 mayhave a corresponding user-profile page in which the corresponding usermay add content, make declarations, or otherwise express himself orherself. As another example and not by way of limitation, a concept node404 may have a corresponding concept-profile page in which one or moreusers may add content, make declarations, or express themselves,particularly in relation to the concept corresponding to concept node404.

In particular embodiments, a concept node 404 may represent athird-party webpage or resource hosted by a third-party system 370. Thethird-party webpage or resource may include, among other elements,content, a selectable or other icon, or other inter-actable object(which may be implemented, for example, in JavaScript, AJAX, or PHPcodes) representing an action or activity. As an example and not by wayof limitation, a third-party webpage may include a selectable icon suchas “like,” “check in,” “eat,” “recommend,” or another suitable action oractivity. A user viewing the third-party webpage may perform an actionby selecting one of the icons (e.g., “eat”), causing a client system 330to send to social-networking system 360 a message indicating the user'saction. In response to the message, social-networking system 360 maycreate an edge (e.g., an “eat” edge) between a user node 402corresponding to the user and a concept node 404 corresponding to thethird-party webpage or resource and store edge 406 in one or more datastores.

In particular embodiments, a pair of nodes in social graph 400 may beconnected to each other by one or more edges 406. An edge 406 connectinga pair of nodes may represent a relationship between the pair of nodes.In particular embodiments, an edge 406 may include or represent one ormore data objects or attributes corresponding to the relationshipbetween a pair of nodes. As an example and not by way of limitation, afirst user may indicate that a second user is a “friend” of the firstuser. In response to this indication, social-networking system 360 maysend a “friend request” to the second user. If the second user confirmsthe “friend request,” social-networking system 360 may create an edge406 connecting the first user's user node 402 to the second user's usernode 402 in social graph 400 and store edge 406 as social-graphinformation in one or more of data stores 364. In the example of FIG. 4,social graph 400 includes an edge 406 indicating a friend relationbetween user nodes 402 of user “A” and user “B” and an edge indicating afriend relation between user nodes 402 of user “C” and user “B.”Although this disclosure describes or illustrates particular edges 406with particular attributes connecting particular user nodes 402, thisdisclosure contemplates any suitable edges 406 with any suitableattributes connecting user nodes 402. As an example and not by way oflimitation, an edge 406 may represent a friendship, family relationship,business or employment relationship, fan relationship, followerrelationship, visitor relationship, subscriber relationship,superior/subordinate relationship, reciprocal relationship,non-reciprocal relationship, another suitable type of relationship, ortwo or more such relationships. Moreover, although this disclosuregenerally describes nodes as being connected, this disclosure alsodescribes users or concepts as being connected. Herein, references tousers or concepts being connected may, where appropriate, refer to thenodes corresponding to those users or concepts being connected in socialgraph 400 by one or more edges 406.

In particular embodiments, an edge 406 between a user node 402 and aconcept node 404 may represent a particular action or activity performedby a user associated with user node 402 toward a concept associated witha concept node 404. As an example and not by way of limitation, asillustrated in FIG. 4, a user may “like,” “attended,” “played,”“listened,” “cooked,” “worked at,” or “watched” a concept, each of whichmay correspond to a edge type or subtype. A concept-profile pagecorresponding to a concept node 404 may include, for example, aselectable “check in” icon (such as, for example, a clickable “check in”icon) or a selectable “add to favorites” icon. Similarly, after a userclicks these icons, social-networking system 360 may create a “favorite”edge or a “check in” edge in response to a user's action correspondingto a respective action. As another example and not by way of limitation,a user (user “C”) may listen to a particular song (“Ramble On”) using aparticular application (SPOTIFY, which is an online music application).In this case, social-networking system 360 may create a “listened” edge406 and a “used” edge (as illustrated in FIG. 4) between user nodes 402corresponding to the user and concept nodes 404 corresponding to thesong and application to indicate that the user listened to the song andused the application. Moreover, social-networking system 360 may createa “played” edge 406 (as illustrated in FIG. 4) between concept nodes 404corresponding to the song and the application to indicate that theparticular song was played by the particular application. In this case,“played” edge 406 corresponds to an action performed by an externalapplication (SPOTIFY) on an external audio file (the song “Imagine”).Although this disclosure describes particular edges 406 with particularattributes connecting user nodes 402 and concept nodes 404, thisdisclosure contemplates any suitable edges 406 with any suitableattributes connecting user nodes 402 and concept nodes 404. Moreover,although this disclosure describes edges between a user node 402 and aconcept node 404 representing a single relationship, this disclosurecontemplates edges between a user node 402 and a concept node 404representing one or more relationships. As an example and not by way oflimitation, an edge 406 may represent both that a user likes and hasused at a particular concept. Alternatively, another edge 406 mayrepresent each type of relationship (or multiples of a singlerelationship) between a user node 402 and a concept node 404 (asillustrated in FIG. 4 between user node 402 for user “E” and conceptnode 404 for “SPOTIFY”).

In particular embodiments, social-networking system 360 may create anedge 406 between a user node 402 and a concept node 404 in social graph400. As an example and not by way of limitation, a user viewing aconcept-profile page (such as, for example, by using a web browser or aspecial-purpose application hosted by the user's client system 330) mayindicate that he or she likes the concept represented by the conceptnode 404 by clicking or selecting a “Like” icon, which may cause theuser's client system 330 to send to social-networking system 360 amessage indicating the user's liking of the concept associated with theconcept-profile page. In response to the message, social-networkingsystem 360 may create an edge 406 between user node 402 associated withthe user and concept node 404, as illustrated by “like” edge 406 betweenthe user and concept node 404. In particular embodiments,social-networking system 360 may store an edge 406 in one or more datastores. In particular embodiments, an edge 406 may be automaticallyformed by social-networking system 360 in response to a particular useraction. As an example and not by way of limitation, if a first useruploads a picture, watches a movie, or listens to a song, an edge 406may be formed between user node 402 corresponding to the first user andconcept nodes 404 corresponding to those concepts. Although thisdisclosure describes forming particular edges 406 in particular manners,this disclosure contemplates forming any suitable edges 406 in anysuitable manner.

In particular embodiments, an advertisement may be text (which may beHTML-linked), one or more images (which may be HTML-linked), one or morevideos, audio, one or more ADOBE FLASH files, a suitable combination ofthese, or any other suitable advertisement in any suitable digitalformat presented on one or more webpages, in one or more e-mails, or inconnection with search results requested by a user. In addition or as analternative, an advertisement may be one or more sponsored stories(e.g., a news-feed or ticker item on social-networking system 360). Asponsored story may be a social action by a user (such as “liking” apage, “liking” or commenting on a post on a page, RSVPing to an eventassociated with a page, voting on a question posted on a page, checkingin to a place, using an application or playing a game, or “liking” orsharing a website) that an advertiser promotes, for example, by havingthe social action presented within a pre-determined area of a profilepage of a user or other page, presented with additional informationassociated with the advertiser, bumped up or otherwise highlightedwithin news feeds or tickers of other users, or otherwise promoted. Theadvertiser may pay to have the social action promoted. As an example andnot by way of limitation, advertisements may be included among thesearch results of a search-results page, where sponsored content ispromoted over non-sponsored content.

In particular embodiments, an advertisement may be requested for displaywithin social-networking-system webpages, third-party webpages, or otherpages. An advertisement may be displayed in a dedicated portion of apage, such as in a banner area at the top of the page, in a column atthe side of the page, in a GUI of the page, in a pop-up window, in adrop-down menu, in an input field of the page, over the top of contentof the page, or elsewhere with respect to the page. In addition or as analternative, an advertisement may be displayed within an application. Anadvertisement may be displayed within dedicated pages, requiring theuser to interact with or watch the advertisement before the user mayaccess a page or utilize an application. The user may, for example viewthe advertisement through a web browser.

A user may interact with an advertisement in any suitable manner. Theuser may click or otherwise select the advertisement. By selecting theadvertisement, the user may be directed to (or a browser or otherapplication being used by the user) a page associated with theadvertisement. At the page associated with the advertisement, the usermay take additional actions, such as purchasing a product or serviceassociated with the advertisement, receiving information associated withthe advertisement, or subscribing to a newsletter associated with theadvertisement. An advertisement with audio or video may be played byselecting a component of the advertisement (like a “play button”).Alternatively, by selecting the advertisement, social-networking system360 may execute or modify a particular action of the user.

An advertisement may also include social-networking-system functionalitythat a user may interact with. As an example and not by way oflimitation, an advertisement may enable a user to “like” or otherwiseendorse the advertisement by selecting an icon or link associated withendorsement. As another example and not by way of limitation, anadvertisement may enable a user to search (e.g., by executing a query)for content related to the advertiser. Similarly, a user may share theadvertisement with another user (e.g., through social-networking system360) or RSVP (e.g., through social-networking system 360) to an eventassociated with the advertisement. In addition or as an alternative, anadvertisement may include social-networking-system context directed tothe user. As an example and not by way of limitation, an advertisementmay display information about a friend of the user withinsocial-networking system 360 who has taken an action associated with thesubject matter of the advertisement.

In particular embodiments, social-networking system 360 may determinethe social-graph affinity (which may be referred to herein as“affinity”) of various social-graph entities for each other. Affinitymay represent the strength of a relationship or level of interestbetween particular objects associated with the online social network,such as users, concepts, content, actions, advertisements, other objectsassociated with the online social network, or any suitable combinationthereof. Affinity may also be determined with respect to objectsassociated with third-party systems 370 or other suitable systems. Anoverall affinity for a social-graph entity for each user, subjectmatter, or type of content may be established. The overall affinity maychange based on continued monitoring of the actions or relationshipsassociated with the social-graph entity. Although this disclosuredescribes determining particular affinities in a particular manner, thisdisclosure contemplates determining any suitable affinities in anysuitable manner.

In particular embodiments, social-networking system 360 may measure orquantify social-graph affinity using an affinity coefficient (which maybe referred to herein as “coefficient”). The coefficient may representor quantify the strength of a relationship between particular objectsassociated with the online social network. The coefficient may alsorepresent a probability or function that measures a predictedprobability that a user will perform a particular action based on theuser's interest in the action. In this way, a user's future actions maybe predicted based on the user's prior actions, where the coefficientmay be calculated at least in part a the history of the user's actions.Coefficients may be used to predict any number of actions, which may bewithin or outside of the online social network. As an example and not byway of limitation, these actions may include various types ofcommunications, such as sending messages, posting content, or commentingon content; various types of a observation actions, such as accessing orviewing profile pages, media, or other suitable content; various typesof coincidence information about two or more social-graph entities, suchas being in the same group, tagged in the same photograph, checked-in atthe same location, or attending the same event; or other suitableactions. Although this disclosure describes measuring affinity in aparticular manner, this disclosure contemplates measuring affinity inany suitable manner.

In particular embodiments, social-networking system 360 may use avariety of factors to calculate a coefficient. These factors mayinclude, for example, user actions, types of relationships betweenobjects, location information, other suitable factors, or anycombination thereof. In particular embodiments, different factors may beweighted differently when calculating the coefficient. The weights foreach factor may be static or the weights may change according to, forexample, the user, the type of relationship, the type of action, theuser's location, and so forth. Ratings for the factors may be combinedaccording to their weights to determine an overall coefficient for theuser. As an example and not by way of limitation, particular useractions may be assigned both a rating and a weight while a relationshipassociated with the particular user action is assigned a rating and acorrelating weight (e.g., so the weights total 100%). To calculate thecoefficient of a user towards a particular object, the rating assignedto the user's actions may comprise, for example, 60% of the overallcoefficient, while the relationship between the user and the object maycomprise 40% of the overall coefficient. In particular embodiments, thesocial-networking system 360 may consider a variety of variables whendetermining weights for various factors used to calculate a coefficient,such as, for example, the time since information was accessed, decayfactors, frequency of access, relationship to information orrelationship to the object about which information was accessed,relationship to social-graph entities connected to the object, short- orlong-term averages of user actions, user feedback, other suitablevariables, or any combination thereof. As an example and not by way oflimitation, a coefficient may include a decay factor that causes thestrength of the signal provided by particular actions to decay withtime, such that more recent actions are more relevant when calculatingthe coefficient. The ratings and weights may be continuously updatedbased on continued tracking of the actions upon which the coefficient isbased. Any type of process or algorithm may be employed for assigning,combining, averaging, and so forth the ratings for each factor and theweights assigned to the factors. In particular embodiments,social-networking system 360 may determine coefficients usingmachine-learning algorithms trained on historical actions and past userresponses, or data farmed from users by exposing them to various optionsand measuring responses. Although this disclosure describes calculatingcoefficients in a particular manner, this disclosure contemplatescalculating coefficients in any suitable manner.

In particular embodiments, social-networking system 360 may calculate acoefficient based on a user's actions. Social-networking system 360 maymonitor such actions on the online social network, on a third-partysystem 370, on other suitable systems, or any combination thereof. Anysuitable type of user actions may be tracked or monitored. Typical useractions include viewing profile pages, creating or posting content,interacting with content, joining groups, listing and confirmingattendance at events, checking-in at locations, liking particular pages,creating pages, and performing other tasks that facilitate socialaction. In particular embodiments, social-networking system 360 maycalculate a coefficient based on the user's actions with particulartypes of content. The content may be associated with the online socialnetwork, a third-party system 370, or another suitable system. Thecontent may include users, profile pages, posts, news stories,headlines, instant messages, chat room conversations, emails,advertisements, pictures, video, music, other suitable objects, or anycombination thereof. Social-networking system 360 may analyze a user'sactions to determine whether one or more of the actions indicate anaffinity for subject matter, content, other users, and so forth. As anexample and not by way of limitation, if a user may make frequentlyposts content related to “coffee” or variants thereof, social-networkingsystem 360 may determine the user has a high coefficient with respect tothe concept “coffee”. Particular actions or types of actions may beassigned a higher weight and/or rating than other actions, which mayaffect the overall calculated coefficient. As an example and not by wayof limitation, if a first user emails a second user, the weight or therating for the action may be higher than if the first user simply viewsthe user-profile page for the second user.

In particular embodiments, social-networking system 360 may calculate acoefficient based on the type of relationship between particularobjects. Referencing the social graph 400, social-networking system 360may analyze the number and/or type of edges 406 connecting particularuser nodes 402 and concept nodes 404 when calculating a coefficient. Asan example and not by way of limitation, user nodes 402 that areconnected by a spouse-type edge (representing that the two users aremarried) may be assigned a higher coefficient than a user nodes 402 thatare connected by a friend-type edge. In other words, depending upon theweights assigned to the actions and relationships for the particularuser, the overall affinity may be determined to be higher for contentabout the user's spouse than for content about the user's friend. Inparticular embodiments, the relationships a user has with another objectmay affect the weights and/or the ratings of the user's actions withrespect to calculating the coefficient for that object. As an exampleand not by way of limitation, if a user is tagged in first photo, butmerely likes a second photo, social-networking system 360 may determinethat the user has a higher coefficient with respect to the first photothan the second photo because having a tagged-in-type relationship withcontent may be assigned a higher weight and/or rating than having alike-type relationship with content. In particular embodiments,social-networking system 360 may calculate a coefficient for a firstuser based on the relationship one or more second users have with aparticular object. In other words, the connections and coefficientsother users have with an object may affect the first user's coefficientfor the object. As an example and not by way of limitation, if a firstuser is connected to or has a high coefficient for one or more secondusers, and those second users are connected to or have a highcoefficient for a particular object, social-networking system 360 maydetermine that the first user should also have a relatively highcoefficient for the particular object. In particular embodiments, thecoefficient may be based on the degree of separation between particularobjects. The lower coefficient may represent the decreasing likelihoodthat the first user will share an interest in content objects of theuser that is indirectly connected to the first user in the social graph400. As an example and not by way of limitation, social-graph entitiesthat are closer in the social graph 400 (i.e., fewer degrees ofseparation) may have a higher coefficient than entities that are furtherapart in the social graph 400.

In particular embodiments, social-networking system 360 may calculate acoefficient based on location information. Objects that aregeographically closer to each other may be considered to be more relatedor of more interest to each other than more distant objects. Inparticular embodiments, the coefficient of a user towards a particularobject may be based on the proximity of the object's location to acurrent location associated with the user (or the location of a clientsystem 330 of the user). A first user may be more interested in otherusers or concepts that are closer to the first user. As an example andnot by way of limitation, if a user is one mile from an airport and twomiles from a gas station, social-networking system 360 may determinethat the user has a higher coefficient for the airport than the gasstation based on the proximity of the airport to the user.

In particular embodiments, social-networking system 360 may performparticular actions with respect to a user based on coefficientinformation. Coefficients may be used to predict whether a user willperform a particular action based on the user's interest in the action.A coefficient may be used when generating or presenting any type ofobjects to a user, such as advertisements, search results, news stories,media, messages, notifications, or other suitable objects. Thecoefficient may also be utilized to rank and order such objects, asappropriate. In this way, social-networking system 360 may provideinformation that is relevant to user's interests and currentcircumstances, increasing the likelihood that they will find suchinformation of interest. In particular embodiments, social-networkingsystem 360 may generate content based on coefficient information.Content objects may be provided or selected based on coefficientsspecific to a user. As an example and not by way of limitation, thecoefficient may be used to generate media for the user, where the usermay be presented with media for which the user has a high overallcoefficient with respect to the media object. As another example and notby way of limitation, the coefficient may be used to generateadvertisements for the user, where the user may be presented withadvertisements for which the user has a high overall coefficient withrespect to the advertised object. In particular embodiments,social-networking system 360 may generate search results based oncoefficient information. Search results for a particular user may bescored or ranked based on the coefficient associated with the searchresults with respect to the querying user. As an example and not by wayof limitation, search results corresponding to objects with highercoefficients may be ranked higher on a search-results page than resultscorresponding to objects having lower coefficients.

In particular embodiments, social-networking system 360 may calculate acoefficient in response to a request for a coefficient from a particularsystem or process. To predict the likely actions a user may take (or maybe the subject of) in a given situation, any process may request acalculated coefficient for a user. The request may also include a set ofweights to use for various factors used to calculate the coefficient.This request may come from a process running on the online socialnetwork, from a third-party system 370 (e.g., via an API or othercommunication channel), or from another suitable system. In response tothe request, social-networking system 360 may calculate the coefficient(or access the coefficient information if it has previously beencalculated and stored). In particular embodiments, social-networkingsystem 360 may measure an affinity with respect to a particular process.Different processes (both internal and external to the online socialnetwork) may request a coefficient for a particular object or set ofobjects. Social-networking system 360 may provide a measure of affinitythat is relevant to the particular process that requested the measure ofaffinity. In this way, each process receives a measure of affinity thatis tailored for the different context in which the process will use themeasure of affinity.

In connection with social-graph affinity and affinity coefficients,particular embodiments may utilize one or more systems, components,elements, functions, methods, operations, or steps disclosed in U.S.patent application Ser. No. 11/503,093, filed 11 Aug. 2006, U.S. patentapplication Ser. No. 12/977,027, filed 22 Dec. 2010, U.S. patentapplication Ser. No. 12/978,265, filed 23 Dec. 2010, and U.S. patentapplication Ser. No. 13/632,869, field 1 Oct. 2012, each of which isincorporated by reference.

FIG. 5 illustrates an example computer system 500. In particularembodiments, one or more computer systems 500 perform one or more stepsof one or more methods described or illustrated herein. In particularembodiments, one or more computer systems 500 provide functionalitydescribed or illustrated herein. In particular embodiments, softwarerunning on one or more computer systems 500 performs one or more stepsof one or more methods described or illustrated herein or providesfunctionality described or illustrated herein. Particular embodimentsinclude one or more portions of one or more computer systems 500.Herein, reference to a computer system may encompass a computing device,and vice versa, where appropriate. Moreover, reference to a computersystem may encompass one or more computer systems, where appropriate.

This disclosure contemplates any suitable number of computer systems500. This disclosure contemplates computer system 500 taking anysuitable physical form. As example and not by way of limitation,computer system 500 may be an embedded computer system, a system-on-chip(SOC), a single-board computer system (SBC) (such as, for example, acomputer-on-module (COM) or system-on-module (SOM)), a desktop computersystem, a laptop or notebook computer system, an interactive kiosk, amainframe, a mesh of computer systems, a mobile telephone, a personaldigital assistant (PDA), a server, a tablet computer system, or acombination of two or more of these. Where appropriate, computer system500 may include one or more computer systems 500; be unitary ordistributed; span multiple locations; span multiple machines; spanmultiple data centers; or reside in a cloud, which may include one ormore cloud components in one or more networks. Where appropriate, one ormore computer systems 500 may perform without substantial spatial ortemporal limitation one or more steps of one or more methods describedor illustrated herein. As an example and not by way of limitation, oneor more computer systems 500 may perform in real time or in batch modeone or more steps of one or more methods described or illustratedherein. One or more computer systems 500 may perform at different timesor at different locations one or more steps of one or more methodsdescribed or illustrated herein, where appropriate.

In particular embodiments, computer system 500 includes a processor 502,memory 504, storage 506, an input/output (I/O) interface 508, acommunication interface 510, and a bus 512. Although this disclosuredescribes and illustrates a particular computer system having aparticular number of particular components in a particular arrangement,this disclosure contemplates any suitable computer system having anysuitable number of any suitable components in any suitable arrangement.

In particular embodiments, processor 502 includes hardware for executinginstructions, such as those making up a computer program. As an exampleand not by way of limitation, to execute instructions, processor 502 mayretrieve (or fetch) the instructions from an internal register, aninternal cache, memory 504, or storage 506; decode and execute them; andthen write one or more results to an internal register, an internalcache, memory 504, or storage 506. In particular embodiments, processor502 may include one or more internal caches for data, instructions, oraddresses. This disclosure contemplates processor 502 including anysuitable number of any suitable internal caches, where appropriate. Asan example and not by way of limitation, processor 502 may include oneor more instruction caches, one or more data caches, and one or moretranslation lookaside buffers (TLBs). Instructions in the instructioncaches may be copies of instructions in memory 504 or storage 506, andthe instruction caches may speed up retrieval of those instructions byprocessor 502. Data in the data caches may be copies of data in memory504 or storage 506 for instructions executing at processor 502 tooperate on; the results of previous instructions executed at processor502 for access by subsequent instructions executing at processor 502 orfor writing to memory 504 or storage 506; or other suitable data. Thedata caches may speed up read or write operations by processor 502. TheTLBs may speed up virtual-address translation for processor 502. Inparticular embodiments, processor 502 may include one or more internalregisters for data, instructions, or addresses. This disclosurecontemplates processor 502 including any suitable number of any suitableinternal registers, where appropriate. Where appropriate, processor 502may include one or more arithmetic logic units (ALUs); be a multi-coreprocessor; or include one or more processors 502. Although thisdisclosure describes and illustrates a particular processor, thisdisclosure contemplates any suitable processor.

In particular embodiments, memory 504 includes main memory for storinginstructions for processor 502 to execute or data for processor 502 tooperate on. As an example and not by way of limitation, computer system500 may load instructions from storage 506 or another source (such as,for example, another computer system 500) to memory 504. Processor 502may then load the instructions from memory 504 to an internal registeror internal cache. To execute the instructions, processor 502 mayretrieve the instructions from the internal register or internal cacheand decode them. During or after execution of the instructions,processor 502 may write one or more results (which may be intermediateor final results) to the internal register or internal cache. Processor502 may then write one or more of those results to memory 504. Inparticular embodiments, processor 502 executes only instructions in oneor more internal registers or internal caches or in memory 504 (asopposed to storage 506 or elsewhere) and operates only on data in one ormore internal registers or internal caches or in memory 504 (as opposedto storage 506 or elsewhere). One or more memory buses (which may eachinclude an address bus and a data bus) may couple processor 502 tomemory 504. Bus 512 may include one or more memory buses, as describedbelow. In particular embodiments, one or more memory management units(MMUs) reside between processor 502 and memory 504 and facilitateaccesses to memory 504 requested by processor 502. In particularembodiments, memory 504 includes random access memory (RAM). This RAMmay be volatile memory, where appropriate Where appropriate, this RAMmay be dynamic RAM (DRAM) or static RAM (SRAM). Moreover, whereappropriate, this RAM may be single-ported or multi-ported RAM. Thisdisclosure contemplates any suitable RAM. Memory 504 may include one ormore memories 504, where appropriate. Although this disclosure describesand illustrates particular memory, this disclosure contemplates anysuitable memory.

In particular embodiments, storage 506 includes mass storage for data orinstructions. As an example and not by way of limitation, storage 506may include a hard disk drive (HDD), a floppy disk drive, flash memory,an optical disc, a magneto-optical disc, magnetic tape, or a UniversalSerial Bus (USB) drive or a combination of two or more of these. Storage506 may include removable or non-removable (or fixed) media, whereappropriate. Storage 506 may be internal or external to computer system500, where appropriate. In particular embodiments, storage 506 isnon-volatile, solid-state memory. In particular embodiments, storage 506includes read-only memory (ROM). Where appropriate, this ROM may bemask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM),electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM),or flash memory or a combination of two or more of these. Thisdisclosure contemplates mass storage 506 taking any suitable physicalform. Storage 506 may include one or more storage control unitsfacilitating communication between processor 502 and storage 506, whereappropriate. Where appropriate, storage 506 may include one or morestorages 506. Although this disclosure describes and illustratesparticular storage, this disclosure contemplates any suitable storage.

In particular embodiments, I/O interface 508 includes hardware,software, or both, providing one or more interfaces for communicationbetween computer system 500 and one or more I/O devices. Computer system500 may include one or more of these I/O devices, where appropriate. Oneor more of these I/O devices may enable communication between a personand computer system 500. As an example and not by way of limitation, anI/O device may include a keyboard, keypad, microphone, monitor, mouse,printer, scanner, speaker, still camera, stylus, tablet, touch screen,trackball, video camera, another suitable I/O device or a combination oftwo or more of these. An I/O device may include one or more sensors.This disclosure contemplates any suitable I/O devices and any suitableI/O interfaces 508 for them. Where appropriate, I/O interface 508 mayinclude one or more device or software drivers enabling processor 502 todrive one or more of these I/O devices. I/O interface 508 may includeone or more I/O interfaces 508, where appropriate. Although thisdisclosure describes and illustrates a particular I/O interface, thisdisclosure contemplates any suitable I/O interface.

In particular embodiments, communication interface 510 includeshardware, software, or both providing one or more interfaces forcommunication (such as, for example, packet-based communication) betweencomputer system 500 and one or more other computer systems 500 or one ormore networks. As an example and not by way of limitation, communicationinterface 510 may include a network interface controller (NIC) ornetwork adapter for communicating with an Ethernet or other wire-basednetwork or a wireless NIC (WNIC) or wireless adapter for communicatingwith a wireless network, such as a WI-FI network. This disclosurecontemplates any suitable network and any suitable communicationinterface 510 for it. As an example and not by way of limitation,computer system 500 may communicate with an ad hoc network, a personalarea network (PAN), a local area network (LAN), a wide area network(WAN), a metropolitan area network (MAN), or one or more portions of theInternet or a combination of two or more of these. One or more portionsof one or more of these networks may be wired or wireless. As anexample, computer system 500 may communicate with a wireless PAN (WPAN)(such as, for example, a BLUETOOTH WPAN), a WI-FI network, a WI-MAXnetwork, a cellular telephone network (such as, for example, a GlobalSystem for Mobile Communications (GSM) network), or other suitablewireless network or a combination of two or more of these. Computersystem 500 may include any suitable communication interface 510 for anyof these networks, where appropriate. Communication interface 510 mayinclude one or more communication interfaces 510, where appropriate.Although this disclosure describes and illustrates a particularcommunication interface, this disclosure contemplates any suitablecommunication interface.

In particular embodiments, bus 512 includes hardware, software, or bothcoupling components of computer system 500 to each other. As an exampleand not by way of limitation, bus 512 may include an AcceleratedGraphics Port (AGP) or other graphics bus, an Enhanced Industry StandardArchitecture (EISA) bus, a front-side bus (FSB), a HYPERTRANSPORT (HT)interconnect, an Industry Standard Architecture (ISA) bus, an INFINIBANDinterconnect, a low-pin-count (LPC) bus, a memory bus, a Micro ChannelArchitecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, aPCI-Express (PCIe) bus, a serial advanced technology attachment (SATA)bus, a Video Electronics Standards Association local (VLB) bus, oranother suitable bus or a combination of two or more of these. Bus 512may include one or more buses 512, where appropriate. Although thisdisclosure describes and illustrates a particular bus, this disclosurecontemplates any suitable bus or interconnect.

Herein, a computer-readable non-transitory storage medium or media mayinclude one or more semiconductor-based or other integrated circuits(ICs) (such, as for example, field-programmable gate arrays (FPGAs) orapplication-specific ICs (ASICs)), hard disk drives (HDDs), hybrid harddrives (HHDs), optical discs, optical disc drives (ODDs),magneto-optical discs, magneto-optical drives, floppy diskettes, floppydisk drives (FDDs), magnetic tapes, solid-state drives (SSDs),RAM-drives, SECURE DIGITAL cards or drives, any other suitablecomputer-readable non-transitory storage media, or any suitablecombination of two or more of these, where appropriate. Acomputer-readable non-transitory storage medium may be volatile,non-volatile, or a combination of volatile and non-volatile, whereappropriate.

Herein, “or” is inclusive and not exclusive, unless expressly indicatedotherwise or indicated otherwise by context. Therefore, herein, “A or B”means “A, B, or both,” unless expressly indicated otherwise or indicatedotherwise by context. Moreover, “and” is both joint and several, unlessexpressly indicated otherwise or indicated otherwise by context.Therefore, herein, “A and B” means “A and B, jointly or severally,”unless expressly indicated otherwise or indicated otherwise by context.

The scope of this disclosure encompasses all changes, substitutions,variations, alterations, and modifications to the example embodimentsdescribed or illustrated herein that a person having ordinary skill inthe art would comprehend. The scope of this disclosure is not limited tothe example embodiments described or illustrated herein. Moreover,although this disclosure describes and illustrates respectiveembodiments herein as including particular components, elements,functions, operations, or steps, any of these embodiments may includeany combination or permutation of any of the components, elements,functions, operations, or steps described or illustrated anywhere hereinthat a person having ordinary skill in the art would comprehend.Furthermore, reference in the appended claims to an apparatus or systemor a component of an apparatus or system being adapted to, arranged to,capable of, configured to, enabled to, operable to, or operative toperform a particular function encompasses that apparatus, system,component, whether or not it or that particular function is activated,turned on, or unlocked, as long as that apparatus, system, or componentis so adapted, arranged, capable, configured, enabled, operable, oroperative.

What is claimed is:
 1. A method comprising: by a computing device,receiving a request from an operating system for particular content fora content layout in a displayable region of a screen associated with thecomputing device, wherein the particular content is containable in aparticular type of display object; by the computing device, accessing,from a storage device, predetermined application-tailored recyclingpolicies associated with a first recycler associated with anapplication, wherein the application-tailored recycling policies governone or more of: how many display objects to retain in the firstrecycler, what types of display objects to store in the first recycler,how to determine whether a display object in the first recycler issuitable for re-use or re-cycling, or when to re-use versus recycle adisplay object in the first recycler; by the computing device,determining, based on the application-tailored recycling policies, thatthe first recycler associated with the application includes a displayobject that is capable of being recycled or re-used for containing theparticular content, wherein the display object is capable of beingrecycled or re-used if it is of the particular type of display object;by the computing device, determining whether the display object containsthe particular content; by the computing device, filling the displayobject with the particular content upon determining that the displayobject does not contain the particular content; by the computing device,encapsulating the display object and one or more additional displayobjects in a wrapper object; by the computing device, returning thewrapper object encapsulating the display object and the one or moreadditional display objects to the operating system for display; by thecomputing device, receiving an indication that the display object is nolonger needed for the content layout in the displayable region; by thecomputing device, extracting the display object from the wrapper object;by the computing device, storing the display object in the firstrecycler associated with the application; and by the computing device,storing the wrapper object without the display object in a secondrecycler associated with the operating system.
 2. The method of claim 1;wherein the application-tailored recycling policies further compriseapplication-specific, device-specific, or user-specific recyclingpolicies.
 3. The method of claim 1, wherein the display object is storedin the first recycler in association with a retrieval key comprising: aposition of the particular content in the content layout, a contentidentifier, a hash key generated based on the particular content, or atimestamp of an activity related to the particular content.
 4. Themethod of claim 1, wherein the particular content comprisessocial-networking information, and wherein the display object is storedin the first recycler in association with a retrieval key comprising anidentifier associated with one or more elements in a social graph towhich the particular content is related.
 5. One or morecomputer-readable non-transitory storage media embodying software thatis operable when executed to: receive a request from an operating systemfor particular content for a content layout in a displayable region of ascreen, wherein the particular content is containable in a particulartype of display object; access, from a storage device, predeterminedapplication-tailored recycling policies associated with a first recyclerassociated with an application, wherein the application-tailoredrecycling policies govern one or more of: how many display objects toretain in the first recycler, what types of display objects to store inthe first recycler, how to determine whether a display object in thefirst recycler is suitable for re-use or re-cycling, or when to re-useversus recycle a display object in the first recycler; determine, basedon the application-tailored recycling policies, that the first recyclerassociated with the application includes a display object that iscapable of being recycled or re-used for containing the particularcontent, wherein the display object is capable of being recycled orre-used if it is of the particular type of display object; determinewhether the display object contains the particular content; fill thedisplay object with the particular content upon determining that thedisplay object does not contain the particular content; encapsulate thedisplay object and one or more additional display objects in a wrapperobject; return the wrapper object encapsulating the display object andthe one or more additional display objects to the operating system fordisplay; receive an indication that the display object is no longerneeded for the content layout in the displayable region; extract thedisplay object from the wrapper object; store the display object in thefirst recycler associated with the application; and store the wrapperobject without the display object in a second recycler associated withthe operating system.
 6. The media of claim 5, wherein theapplication-tailored recycling policies further compriseapplication-specific, device-specific, or user-specific recyclingpolicies.
 7. The media of claim 5, wherein the display object is storedin the first recycler in association with a retrieval key comprising: aposition of the particular content in the content layout, a contentidentifier, a hash key generated based on the particular content, or atimestamp of an activity related to the particular content.
 8. The mediaof claim 5, wherein the particular content comprises social-networkinginformation, and wherein the display object is stored in the firstrecycler in association with a retrieval key comprising an identifierassociated with one or more elements in a social graph to which theparticular content is related.
 9. A system comprising: one or moreprocessors; and a memory coupled to the processors comprisinginstructions executable by the processors, the processors being operablewhen executing the instructions to: receive a request from an operatingsystem for particular content for a content layout in a displayableregion of a screen, wherein the particular content is containable in aparticular type of display object; access, from a storage device,predetermined application-tailored recycling policies associated with afirst recycler associated with an application, wherein theapplication-tailored recycling policies govern one or more of: how manydisplay objects to retain in the first recycler, what types of displayobjects to store in the first recycler, how to determine whether adisplay object in the first recycler is suitable for re-use orre-cycling, or when to re-use versus recycle a display object in thefirst recycler; determine, based on the application-tailored recyclingpolicies, that the first recycler associated with the applicationincludes a display object that is capable of being recycled or re-usedfor containing the particular content, wherein the display object iscapable of being recycled or re-used if it is of the particular type ofdisplay object; determine whether the display object contains theparticular content; fill the display object with the particular contentupon determining that the display object does not contain the particularcontent; encapsulate the display object and one or more additionaldisplay objects in a wrapper object; return the wrapper objectencapsulating the display object and the one or more additional displayobjects to the operating system for display; receive an indication thatthe display object is no longer needed for the content layout in thedisplayable region; extract the display object from the wrapper object;store the display object in the first recycler associated with theapplication; and store the wrapper object without the display object ina second recycler associated with the operating system.
 10. The systemof claim 9, wherein the application-tailored recycling policies furthercomprise application-specific, device-specific, or user-specificrecycling policies.
 11. The system of claim 9, wherein the displayobject is stored in the first recycler in association with a retrievalkey comprising: a position of the particular content in the contentlayout, a content identifier, a hash key generated based on theparticular content, or a timestamp of an activity related to theparticular content.
 12. The system of claim 9, wherein the particularcontent comprises social-networking information, and wherein the displayobject is stored in the first recycler in association with a retrievalkey comprising an identifier associated with one or more elements in asocial graph to which the particular content is related.